def dictfetchsome(cursor):
    "将游标返回的结果保存到一个字典对象中"

    desc = ['user_id','username','status','btc','btcd','eth','ethd','login_time']
    # cursor = connections['db1'].cursor()
    return [
    dict(zip([col for col in desc], row))
    for row in cursor.fetchall()
    ]
def dictfetchall(cursor):
    "Returns all rows from a cursor as a dict"
    desc = cursor.description
    return [
        dict(zip([col[0] for col in desc], row))
        for row in cursor.fetchall()
    ]